function confirm(message, callback) {
	jQuery('#confirm').modal({
		closeHTML: "<a href='#' title='Close' class='modal-close'>x</a>",
		position: ["20%",],
		overlayId: 'confirm-overlay',
		containerId: 'confirm-container', 
		onShow: function (dialog) {
			var modal = this;

			jQuery('.message', dialog.data[0]).append(message);

			// if the user clicks "yes"
			jQuery('.yes', dialog.data[0]).click(function () {
				// call the callback
				if (jQuery.isFunction(callback)) {
					callback.apply();
				}
				// close the dialog
				modal.close(); // or $.modal.close();
			});
		}
	});
}

jQuery(document).ready(function() {
	var tabs = jQuery('#escort-option').tabs({
		cache: true
	}).scrollabletab({
		
	});
	
	jQuery("#option-box").change(function(){
		
		if(jQuery(this).val() != ""){
			jQuery('#escort-option').tabs( "select" , jQuery(this).val() );
		}
		tabsNav = tabs.find('.ui-tabs-nav');
		navWidth = 0;
		tabToScrollTo = tabsNav.find('li.ui-tabs-selected');
		offsetLeft = -(tabs.width()-(tabToScrollTo.outerWidth(true)+navWidth+parseInt(tabsNav.find('li:last').css('margin-right'),10)));
		
		tabsNav.scrollTo(tabsNav.find('li.ui-tabs-selected'),200,{'axis':'x', 'margin':true, 'offset': {'left':offsetLeft + 30}});
		
	});
});